package jdk.thread.collection;

import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;

/**
 * 并发容器
 */
public class ArrayBlockingQueueTest {

    public static void main(String[] args) throws InterruptedException {

        ArrayBlockingQueue<Integer> queue = new ArrayBlockingQueue<>(1);

        queue.add(1);
        queue.offer(1);
        queue.put(1);

        queue.poll();
        queue.take();
        queue.peek();
    }
}
